package com.h6.crm.controller;

import com.h6.crm.annotation.ResponseResult;
import com.h6.crm.service.HrEmployeeService;
import com.h6.crm.util.pojo.R;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;

import com.h6.crm.entity.HrEmployee;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Tag(name = "公司员工管理", description = "公司员工管理(业务员)的API")
@RestController
@RequestMapping("/employee")
@ResponseResult
public class HrEmployeeController {

  @Autowired
  HrEmployeeService employeeService;

  @Operation(summary = "查询员工列表")
  @ApiResponses({
      @ApiResponse(responseCode = "200", content = {
          @Content(schema = @Schema(implementation = R.class), mediaType = "application/json") }) })
  @PostMapping("/list")
  public List<HrEmployee> queryEmployeeList() {
    return employeeService.queryEmployeeList();
  }

}
